<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <ul id="list">
      <li>li1</li>
      <li>li2</li>
      <li>li3</li>
    </ul>
    <script>
      const div = document.createElement("div");
      const text = document.createTextNode("hello text");

      const nli1 = document.createElement("li");
      const nli2 = document.createElement("li");
      nli1.innerHTML = "helli nli1";
      nli2.innerHTML = "helli nli2";

      const ul = document.getElementById("list");

      setTimeout(() => {
        ul.insertAdjacentElement("beforeend", nli1);
        ul.insertAdjacentElement("beforeend", nli2);
        ul.insertAdjacentText("beforeend", "hello <b>t1</b>");
        ul.insertAdjacentHTML("beforeend", "hello <b>t1</b>");
      }, 3000);
    </script>
  </body>
</html>
